package com.oop.Demo08;
//继承Exception
public class MyException extends Exception {
    //传递数字>10
    private int detail;

    public MyException(int detail) {
        this.detail = detail;
    }

    //toString:异常的打印信息

    @Override
    public String toString() {
        return "My Exception {"+detail+"}";
    }
}

